<%@ page pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title>唯星集团</title>
	<meta name="keywords" content="唯星集团">
	<meta name="description" content="唯星集团">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<link rel="shortcut icon" href="images/favicon.ico">
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>

	<!-- include main css -->
	<link rel="stylesheet" type="text/css" href="css/slick.css"/>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
	<link rel="stylesheet" type="text/css" href="css/jquery.mmenu.all.css"/>
	<link rel="stylesheet" type="text/css" href="css/style.css"/>
	<link href="font-awesome-4.5.0/css/font-awesome.min.css" rel='stylesheet' type='text/css' media="all" />
	<link rel="stylesheet" type="text/css" href="css/animate.css"/>
	<script src="js/jquery.min.js"></script>
	<link rel="stylesheet" href="layui/css/layui.css"  media="all">
	<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body >
<header class="header">
	<div class="container clearfix">
		<div class="logo">
			<a href="index.html"><!--<img src="images/logo.png" alt="" />--><h1>Hello</h1></a>
		</div>
		<div class="nav_right">
			<nav>
				<ul class="clearfix">
					<li><a href="index">首页</a></li>
					<li><a href="case.html">挑选爱犬</a>
						<ul>
							<li><a href="case.html">小型犬</a></li>
							<li><a href="case.html">中型犬</a></li>
							<li><a href="case.html">大型犬</a></li>
						</ul>
					</li>
					<li><a href="kehu.html">狗狗周边</a>
						<ul>
							<li><a href="kehu.html">北京</a></li>
							<li><a href="kehu.html">上海</a></li>
							<li><a href="kehu.html">天津</a></li>
						</ul>
					</li>
					<li><a href="fuwu_price.html">寻找另一半</a></li>
					<li><a href="mycenter" class="active">个人中心</a>
					</li>
					<li><a href="team.html">购物车</a>
						<ul>
							<li><a href="team.html">北京</a></li>
							<li><a href="team.html">上海</a></li>
							<li><a href="team.html">天津</a></li>
						</ul>
					</li>

					<li><a href="news.html">新闻资讯</a>
						<ul>
							<li><a href="news.html">最新优惠</a></li>
							<li><a href="news.html">公司新闻</a></li>
							<li><a href="news.html">行业新闻</a></li>
						</ul>
					</li>
					<li><a href="contact.html">联系我们</a>
						<ul>
							<li><a href="contact.html">联系我们</a></li>
							<li><a href="feedback.html">在线留言</a></li>
						</ul>
					</li>
				</ul>
			</nav>
			<div class="cen">
				<a href="">CN</a>
				<a href="">EN</a>
			</div>
		</div>


		<a href="#mmenu" class="phone-nav"><i class="fa fa-list"></i></a>

	</div>
</header>
<div class="crumbs">
	<div class="centerBlock">您当前的位置：<a href="index">首页 </a>  > <span>个人中心</span></div>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<p>${info}</p>
<div class="content" style="height: 1000px; width: 70%;margin: auto;">


	<div class="comon_top">
		<div class="top_nav">
			<a href="mycenter"  class="active"><span>个人信息</span></a><a href="sellDog"><span>我要卖狗狗</span></a><a href="shouchang"><span>我的收藏</span></a>
			<a href="about"  ><span>我的购物车</span></a><a href="dizhi"><span>地址管理</span></a><a href="uppwd"><span>修改密码</span></a>
		</div>
	</div>
	<br>
	<hr>
	<br>

	<div style="width: 200px;height: 200px;background: white;margin-left: 200px;float:left;">
		<div >
            <div class="layui-upload" >
                <input type="hidden" name="id" value="${user.userId}">
                <div class="layui-upload-list">
                    <img class="layui-upload-img"   style="float: left;border: 0px" width="150px" height="150px" id="demo1">
                    <p id="demoText"></p>
                </div>
            </div>
        </div>
        <div id="userimgs">
			<img  src="${user_path}/${user_img}" width="150px" height="150px" style="margin-left: -150px" alt=""  />
		</div>

		<%--<div  style="height: 50px;width: 100%;text-align: center;font-size: 20px;line-height: 50px;">
			</div>--%>

		<button type="button"  onclick="changeimg()" class="layui-btn" id="test1" name="file">编辑</button>

	</div>



	<div style="width: 600px; height: 200px;float:left;margin-left: 50px;">

		<div class="layui-form">
			<table class="layui-table">
				<colgroup>
					<col width="150">
					<col width="150">
					<col width="200">
					<col>
				</colgroup>

				<tbody>
				<form action="updateusername" method="post">
                    <input type="hidden" name="id" value="${user.userId}">
                    <tr>
                        <td>用户名:</td>
                        <td colspan="2"><input type="text" name="username" placeholder="${user.userUsername}" style="border-width: 0;"></td>
                        <td ><input type="submit" value="修改" class="layui-btn"></td>
                    </tr>
                </form>
                <form action="updatename" method="post">
                    <input type="hidden" value="${user.userId}">
				<tr>
					<td>姓名:</td>
					<td colspan="2"><input type="text" placeholder="${user.userName}" style="border-width: 0;"></td>
					<td ><input type="button" value="修改" class="layui-btn"></td>
				</tr>
                </form>
                    <form action="updatetel" method="post">
                        <input type="hidden" value="${user.userId}">
				<tr>
					<td>联系电话:</td>
					<td colspan="2"><input type="text" placeholder="${user.userTel}" style="border-width: 0;"></td>
					<td ><input type="button" value="修改" class="layui-btn"></td>
				</tr>
                    </form>
                        <form action="updateaddr" method="post">
                            <input type="hidden" value="${user.userId}">
				<tr>
					<td>联系地址:</td>
					<td colspan="2"><input type="text" placeholder="${user.userAddress}" style="border-width: 0;"></td>
					<td ><input type="button" value="修改" class="layui-btn"></td>
				</tr>
                        </form>

				</tbody>
			</table>
		</div>


	</div>
	<div style="clear: both;"></div>


	<br>
	<br>
	<br>
	<br>
	<br>
	<hr>
	<h1 style="text-align: center;">我的发布</h1>
	<div class="news_con clearfix">
		<ul class="clearfix">
			<c:forEach  items="${dog_img}" var="item">
				<li>
					<a href="news_show.html">
						<div class="pic">
							<img src="${dog_path}/${item.dogPictureAddress}" alt="图片未显示" class="vcenter" />
							<i></i>
						</div>
						<div class="txt">
							<h3>￥：${item.dogPrices}</h3>
							<div class="time">发布时间:[${item.dogReleaseDate}]</div>
                            <div class="time">${item.dogType}--${item.dogName}--年龄:${item.dogAge}--性别:${item.dogSex}</div>
							<p>
                                    ${item.dogContent}
							</p>
							<a href="deletedogs?id=${item.dogId}&userid=${user.userId}"><button class="layui-btn ">删除发布</button></a>
							<a href="update_dog_info"><button class="layui-btn ">修改信息</button></a>
						</div>
					</a>
				</li>
			</c:forEach>



		</ul>

	</div>




	<br>
	<br>
	<br>
	<br>
	<br>
	<hr>
	<h1 style="text-align: center;">猜你喜欢</h1>
	<div class="news_con clearfix">
		<ul class="clearfix">
			<li>
				<a href="news_show.html">
					<div class="pic">
						<img src="images/dog1.jpg" alt="" class="vcenter" />
						<i></i>
					</div>
					<div class="txt">
						<h3>整合数字资源,技术驱动营销</h3>
						<div class="time">[2013-06-18]</div>
						<p>
							唯星深刻理解未来数字营销内容与技术的融合之势，积极引进优秀的互联网技术营销策略及内容创意专家，先后从... ...
						</p>
					</div>
				</a>
			</li>
			<li>
				<a href="news_show.html">
					<div class="pic">
						<img src="images/dog1.jpg" alt="" class="vcenter" />
						<i></i>
					</div>
					<div class="txt">
						<h3>唯星集团分别与复旦大学</h3>
						<div class="time">[2013-06-18]</div>
						<p>
							经过多年在技术创新领域的探索与积累，唯星集团目前已获得虹口区科技小巨人企业... ...
						</p>
					</div>
				</a>
			</li>
			<li>
				<a href="news_show.html">
					<div class="pic">
						<img src="images/dog1.jpg" alt="" class="vcenter" />
						<i></i>
					</div>
					<div class="txt">
						<h3>唯星集团目前已获得虹口区</h3>
						<div class="time">[2013-06-18]</div>
						<p>
							秉承"整合数字资源,技术驱动营销"的理念，专注于数字营销技术、产品、资源、服务的创新与整合，为传统企业... ...
						</p>
					</div>
				</a>
			</li>
			<li>
				<a href="news_show.html">
					<div class="pic">
						<img src="images/dog1.jpg" alt="" class="vcenter" />
						<i></i>
					</div>
					<div class="txt">
						<h3>唯星深刻理解未来数字营销内...</h3>
						<div class="time">[2013-06-18]</div>
						<p>
							唯星深刻理解未来数字营销内容与技术的融合之势，积极引进优秀的互联网技术营销策略及内容创意专家，先后从... ...
						</p>
					</div>
				</a>
			</li>
		</ul>

	</div>

</div>

<script>
    layui.use(['form','layer','table','upload','layedit', 'laydate'], function(){
        var table = layui.table
            ,form = layui.form
            ,upload = layui.upload
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        var uploadInst = upload.render({
            elem: '#test1'
            ,url: 'uploaduser?id='+${user.userId}
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo1').attr('src', result); //图片链接（base64）
                });
            }
            ,done: function(res){
                //如果上传失败
                if(res.code > 0){//自定义返回失败
                    return layer.msg('上传失败');
                }else{
                    $('#pic').val(res.img);
                }
                //上传成功
            }


        });
        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '标题至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });



    })

</script>

	<script>
		function changeimg() {
		$("#userimgs").css("display","none");}

	</script>

</body>
<!--Include Js-->
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<!--移动端导航-->
<script src="js/jquery.mmenu.all.min.js" type="text/javascript" charset="utf-8"></script>
<!--slick-->
<script src="js/slick.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/wow.js" type="text/javascript" charset="utf-8"></script>

<!--placeholder-->
<script src="js/jquery.placeholder.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    $(function(){ $('input, textarea').placeholder(); });
</script>
<script src="js/public.js" type="text/javascript" charset="utf-8"></script>




</html>
